home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nejlepší hry
/
Nejlepsi hry.iso
/
hry
/
sea of chaos
/
sea_install.msi
/
_15C39AAA7726369D39812BD40F01CF6A
/
_9C743A3F76664C4C961CC98F2A0A87CD
< prev
next >
Wrap
Text File
|
2005-07-29
|
657b
|
30 lines
//extrudes object away from a light, fading out far edge
//Luke Lenhart
//(C)2004-2005 Digipen Institute of Technology
//texture sampler
sampler2D sampTex;
//blend factor between 2 spots within texture
float blend;
//shader input
struct PS_INPUT
{
float4 Color : COLOR;
float2 Tex0 : TEXCOORD0;
float4 Pos : TEXCOORD1;
};
//shader code
float4 PShader(PS_INPUT In) : COLOR
{
//sample from here, and from 0.5 off
float4 clr0=tex2D(sampTex,In.Tex0);
float4 clr1=tex2D(sampTex,In.Tex0+float2(0.5f,0));
//calc blend factor based on blendPos
//float ipol=sin(blendPos)
return lerp(clr0,clr1,blend)*In.Color;
}